package com.mingyue.usercenter.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.mingyue.usercenter.common.Result;
import com.mingyue.usercenter.model.User;
import jakarta.servlet.http.HttpServletRequest;

import java.util.List;

/**
* @author 我自飞扬临天下
* @description 针对表【user(用户表)】的数据库操作Service
* @createDate 2024-12-01 22:57:24
*/
public interface UserService extends IService<User> {

    /**
     *用户注册
     *
     * @param userAccount 用户账户
     * @param userPassword 用户密码
     * @param checkPassword 校验密码
     * @return
     */

    Result userRegister(String userAccount, String userPassword, String checkPassword);


    /**
     * 用户登录
     * @param userAccount
     * @param userPassword
     * @return 脱敏后的数据
     */
    Result userLogin(String userAccount, String userPassword, HttpServletRequest request);

    /**
     * 根据关键字查询数据
     * @param username
     * @return
     */
    List<User> searchUser(String username);

    /**
     * 用户脱敏
     *
     * @param user
     * @return
     */
    User userTuoMin(User user);

    /**
     * 用户注销
     *
     * @return
     */
    Integer userLogout(HttpServletRequest request);


}
